﻿using System;

namespace MessagePack.Decoders
{
	// Token: 0x02000086 RID: 134
	internal class Bin32Bytes : IBytesDecoder
	{
		// Token: 0x0600024D RID: 589 RVA: 0x0000B368 File Offset: 0x00009768
		private Bin32Bytes()
		{
		}

		// Token: 0x0600024E RID: 590 RVA: 0x0000B370 File Offset: 0x00009770
		public byte[] Read(byte[] bytes, int offset, out int readSize)
		{
			int num = (int)bytes[offset + 1] << 24 | (int)bytes[offset + 2] << 16 | (int)bytes[offset + 3] << 8 | (int)bytes[offset + 4];
			byte[] array = new byte[num];
			Buffer.BlockCopy(bytes, offset + 5, array, 0, num);
			readSize = num + 5;
			return array;
		}

		// Token: 0x040000AD RID: 173
		internal static readonly IBytesDecoder Instance = new Bin32Bytes();
	}
}
